import { normalize, schema } from 'normalizr'

const dataset = new schema.Entity('dataset', {}, { idAttribute: 'name' })
const server = new schema.Entity('server', {
  dataset_array: [dataset],
})
const servers = new schema.Array(server)

export default originalData => normalize(originalData, servers)
